//
//  Demo05HeaderView.swift
//  APPTestSwift
//
//  Created by hiking on 2020/2/23.
//  Copyright © 2020 hiking. All rights reserved.
//

import UIKit

class Demo05HeaderView: UICollectionReusableView {
    lazy var titleLabel:UILabel = {
        let titleLabel = UILabel.init(frame: CGRect.init(x: self.redView.frame.maxX+15, y: 5, width: 150, height: self.frame.size.height-10))
        titleLabel.textColor = .black
        titleLabel.font = UIFont.systemFont(ofSize: 16)
        return titleLabel
    }()
    lazy var redView:UIView = {
        let redView = UIView.init(frame: CGRect.init(x: 20, y: 5, width: 5, height: self.frame.size.height-10))
        redView.backgroundColor = UIColor.init(red:203/255.0, green:13/255.0, blue:29/255.0, alpha:1)
        return redView
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.addSubview(self.redView)
        self.addSubview(self.titleLabel)
        self.backgroundColor = UIColor.init(red:243/255.0, green:243/255.0, blue:243/255.0, alpha:1)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
}
